hi , i am trying to redirect http://someone.mydomain.com to http://mydomain.com/publisher.php?pb=someone i dont have that much idea about .htaccess file what i did is like this : RewriteEngine on RewriteCond %{HTTP_HOST} ^(.*)\.mydomain\.com [NC] RewriteRule .* /publisher.php?pb=$1 [L] and when i type http://someone.mydomain.com its giving me server not found can anyone help me ? please ..
If you're trying to redirect, you can use PHP <?PHP header("Location: http://mydomain.com/publisher.php?pb=someone"); ?> Set that page as 404 and it should work
hello first need enable wild card dns add this entrie in domain.com.db in /var/named * IN CNAME @ after this add entrie in httpd.conf under your virtual host ServerAlias *.domainname.com now the server answer all subdomains request and use the htaccess to redirect Best